package com.github.thinwonton.spring.aop.proxy;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

/**
 * 环绕advice
 */
public class UserServiceArroundInterceptor implements MethodInterceptor {
    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        System.out.println("before");
        Object retVal = invocation.proceed();
        System.out.println("after");
        return retVal;
    }
}
